home *** CD-ROM | disk | FTP | other *** search
- Subject: Re: Read / Write FW_OFileSpecification
- Sent: 8/15/96 5:10 PM
- Received: 8/15/96 4:31 PM
- From: john paulson, paulson3@apple.com
- Reply-To: ODF Interest, ODF-Interest@CILabs.ORG
- To: OpenDoc Development Framework Discussion List, ODF-Interest@CILabs.
-
-
- >
- >How do I read and write an FW_OFileSpecification to and from a stream?
- >Will ODF2 override the << and >> operators for all framework classes?
-
- Why do this? Filenames are not cross platform, users can
- move/delete/rename
- files between the times you save the file spec and the next time the file
- spec is
- fetched. Invalid, stale data.
-
- If you _must_ do this, you have several options:
-
- 1. Mac only
- Use the "void MacGetFSSpec(out FSSpec macSpec);" method to get the
- FSSpec. Then
- you can either save the FSSpec, or (preferably) get an AliasHandle
- from the FSSpec
- and save the AliasHandle. To re-create the FW_OFileSpecification, you
- can create
- a FW_OFileSpec and then call "void AssignFileSpec(in FSSpec*
- macSpec);" to assign
- the FSSpec to it.
-
- 2. Platform independent
- Get the full pathname using "void GetFullPath(out FW_HString
- fullPathName);" and
- re-create with "void InitFromFileName(in FW_HString fileName);"
-
- Hope this helps.
-
-